import re


def is_email_localpart(localpart: str) -> bool:
    """Validates the local part of an email address."""

    # Make sure localpart is of proper type and specified
    if not localpart or type(localpart) is not str:
        return False

    # Define the local part regular expression
    localpart_regex = r"[a-z0-9!#\$%&'\*\+\-/=\?\^_`\{\|\}~]+" \
                      + r"([a-z0-9!#\$%&'\*\+\-/=\?\^_`\{\|\}~]+\.?)" \
                      + r"+[a-z0-9!#\$%&'\*\+\-/=\?\^_`\{\|\}~]+"

    # Match input to regex
    if not (re.match(r'^' + localpart_regex + r'$', localpart.lower()) is None):
        return True

    return False