There's a function called "is_pid_alive" which does the same thing but returns a bool.  It's in the nova::process namespace in the header file "nova/process.h".