strlen on ````null```` ?
I would have used empty.

just asking .....