This should work – using wp_upload_dir
to get the path, then checking to see if it exists – and creating it if it doesn’t.
$upload_dir = wp_upload_dir();
if (!is_dir($upload_dir['path'])) { // directory doesn't exist
mkdir($structure, 0744, true); // the mode to use here may vary based on your hosting environment
}