error on invalid type