protect the null of bitmap