check if image is blank before trying to render it