Check if command exist using Bash

A nifty code snippet that will allow you to check for the availability of a command.

#!/bin/bash

if type "command-name" &> /dev/null; then
echo "Command exist!"
else
echo "Command does not exist! :("
fi

Used this myself for a script, where I wanted to make sure a certain command was available before continuing the script execution.
That being said; it was a bit of a pain to figure out how to do this, while searching the web for answers!

Solution discovered, solution shared.