Prevent NPE while getting bind values and attachments info