make suer we check for type and use it if it exists