Added a template check that works for member functions.