added nil check simpletype