created by can be null so check first to avoid error