ensure types is always passed as an array