Use method from UIUtilites and add null check