add more type check and conversion for user_product