Added if statement type checks