Add is_real functionality for factorial