javascript test if value is boolean