get the permalink never return with empty value

You just need to check if $customID is set, first. E.g.

if ($customID && get_permalink ($customID)) {
    echo 'true';
} else {
    echo 'false';
}