Add trove classifier for Python 3
Fix a couple more type checks from static analysis