Fix comparison for null/boolean values