Added checks also to boolean values.