javascript check if value is boolean