fix: get_pi none or empty check