check if string (i.e. $) exists in $