Any halfway decent compiler will detect that the argument to strlen is not being changed in the loop, and will create a temporary variable to cache the result. So, the overhead of a function call is eliminated.
And, yes, checking for a NULL is quicker, too. It's just not as readable, to me. I know what strlen does, and can follow the loop without thinking much about how strlen works. The code with the NULL check does not feel as obvious to me.