Fix comparison for null and boolean values