Fix Resource to support __contains__ used in validation