Return early if lockScreen.unlock or lockScreen.lock

is undefined. It fixes gaia_test.py screen lock/unlock issue.
Reference bugid: 1031029

Change-Id: I7b1e5a373e041cf45911f51f5be021cd5856b88b