Move setting `created` to prePersist callback. Handle null `created` for tests