Better check to handle boolean values
Added more properties