Adjusted ev.source check for to accept null for Firefox extensions

This pull request adds a tolerance check for `ev.source === null` as is present in Firefox extensions. For more information, please refer to #3.