Comparing ObjectIds in Realm function

Hi,

I’ve been trying to compare two ObjectIds inside a realm function. However they seem to be lacking the typical id.equals(other) function. How do I check for equality? Do I need to do to a string cast, or is there a better way?

Thanks in advance.