Fix NPE with instrumentation test case

1. Check if test artifact is null
2. Don't add null as test artifact if
not uiautomator