Replace strlen() with is_null()