Changed field_is_fk variable to has_related_resource, as requested.
Also added comments to clarify the reason for the added checks.