Wrote type checking for exponentiation.