added isreal

Added `isreal` function.