not related to the patch but... why do we use try here? can ```includes``` return nil?
also ```if not type.nil?``` could be written as unless