changed type check to explicit string.