Fix  "Error in timer: (wrong-type-argument characterp nil)" when the point is at the end of the buffer

newest emacs snapshot will not drop error message any more.
and "(char-syntax (char-after)) " of haskell-ident-at-point  will throw error  message now.