Make sure we have a character to check against

Fix #1856