Remove unnecessary helper function
Change NULL comparison to using zeros

The compiler was complaining