Adds check for invalid removeListener arguments.
travisplexer: pr-293-linux travis ci test