accepts form even if 1 input is invalid php

I’m trying to make a simple registration form but, when I input a first name as a “123” or leave it blank and the last name having a normal string w/o nums, the form still accepts it as a valid data. but if I enter the “123” at the last name but a real name on the first_name. I get the appropriate response for this. any idea?

$_SESSION['errors'] = array();
    if (empty($_POST['first_name']) || is_numeric($_POST['first_name'])) {
        $_SESSION['errors'][] = "Invalid First Name";
        header("Location: index.php");
    }
    if (empty($_POST['last_name']) || is_numeric($_POST['last_name'])) {
        $_SESSION['errors'][] = "Invalid Last Name";
        header("Location: index.php");
    }
    else {
        header("Location: process.php");
    }