Prevent crash from nil character inputed