[Issue #312] Adding check for respondsToSelector to mitigate possibility of incorrect reference in data detection block