Removed NULL check and used cstddef header