added terminfo keys verification

As discussed https://github.com/robbyrussell/oh-my-zsh/issues/2608. The terminfo keys verification seems acceptable workaround to me.