changed string class comparison to respond_to?