cleanup comparisions to use instanceof and compare against ''
CS