To make this work in zsh or bash, such that aliases & functions are not considered while still being POSIX-compliant, just shell out:
xdg_open_path="$(sh -c "command -v xdg-open")"
if [ "$?" -eq 0 ]; then
echo "xdg-open: is ${xdg_open_path}"
else
echo 'xdg-open: not found' 1>&2
fi