Here is a quick snippet to check whether the user is exists or not by user_id in WordPress.
$user = get_userdata( $user_id );
if ( $user === false )
{
// The user doesn't exist
}
else
{
// The user exists
}
Have any doubt, then comment here!