Added checks on booleans