got rid of separate null test