Catch exception

command.getElement() may return null. Appium must catch exception or it'll crash with a NullPointerException.

Fix #1140
Merge pull request #1145 from bootstraponline/catch_exception

Catch exception