catch NoneType syntax error to avoid python's printed stack trace
Merge pull request #80 from emilyhsia/master

catch NoneType syntax error to avoid python's printed stack trace