Add isOwnedBy function