detect the common problem

If the caller tries to parse a pull event into a pull_request event, we'd choke with NPE. This change avoids that.