Data setter refactored: data is validated first and only then assigned to entity, that allows to validate empty properties
Getting data using getters, better json encoding