Need a null check here or it fails when there is no related item: `Cannot call method 'serialize' of null`