Use respond_to? instead of checking type
Merge pull request #27 from katgironpe/master

Use respond_to? instead of checking type