Check whether a string is a valid MAC address.