Correctly match boolean and null values