Added if statements for real and bool types.