Better way to detect method present

Thanks to @sferik for the catch