javascript test if boolean