This is a fix to check  the argument to RequestHandler.write()
is one of the accepted types: dict, bytes or unicode and raise a TypeError otherwise
Merge pull request #979 from mike4999/simple_fix

 Fix for RequestHandler.write   to check for NoneType in argument