Made bounds T instead of double, added is() function to check if the value is instanceof a class.