Updated to ensure NULL is never a value