implemented type check for literals