Throwing ArgumentNullException when using null handler.