javascript check if boolean is true