Fix #1: Test of uninitialized properties should use isLoaded(entity, attributeName) instead of isLoaded(entity).