Added type check for Boolean