Move NULL-check before first dereference
Move NULL-check before first dereference

The variable `fmt` in `str_to_time()` gets dereferenced by passing it to
`strcmp` before a NULL check.

check_after_deref: Null-checking fmt suggests that it may be null, but it has already been dereferenced on all paths leading to the check.

Found by Coverity

allinurl/goaccess,allinurl/goaccess,allinurl/goaccess,allinurl/goaccess