making sure key is a valid bson_id