bug fix

When getting type a null pointer was caused due to the data being of
Types.Unknown and this not being tested for in switch