Added validation for presence of user_id