Rename properties to metadataProperties. Also initialize it to Collections.emptyMap() instead of null. Refactor code to handle these changes.