fix for when type doesnt exist or is falsy