Correct exception which can ocurr when specifying alternate SDK version via
desired capabilities

-Fixing an issue where a ClassCastException occurs when deviceCapability.getCapability(IOSCapabilities.UI_SDK_VERSION_ALT) returns a JSONArray.
-Added a Null pointer check to avoid NPE when deviceCapability.getCapability(IOSCapabilities.UI_SDK_VERSION_ALT) returns NULL