prevent error when comparing relation to proxy instance