Improved error message occurred while accessing uninitialized field in entity