added null check to @UiThread-ed methods