OZP-812 - added in the null check in the remove functions due to the same issue happening.