changed typeListJSON to typeList
Check if first returns an actual object before working on it
Fixed import of type and cause
Merge branch 'develop'