Add check for user_data length