Fixed python-mode check.

string-match fails if find-lisp-object-file-name returns nil.
Added check before calling string-match.