secure possible NULL-Pointer access in strlen