catch the null exception of get img