Hi colinj
Welcome to the communities.
Same thing was happening with me while I was in process of remove my mailbox server role.
And I found some object entry not found on AD due to which getting null value .
please check you ad database size & try to do some cleaning then check it .