Fix TypeError when no User Agent is provided.

:eyeglasses: @spladug