According to the BASH manual:
-p file
True if file exists and is a named pipe (FIFO).
So:
if [[ -p /tmp/my_fifo ]]; then
# commands to execute
fi
The question has the tag, _bash_. In context, the usage of `[[` and `]]` is specific to BASH. (Tangentially, `[[` and `]]` also work with zsh and the Korn shell.) See BashFAQ/031. Portable scripts should be written with `[` and `]` which work in all POSIX shells.