LPS-40221 fix NullPointerException, but we should consider this performance penalty. (for example, adding more information to the image table)