Go back to checking if the  value can be executed instead of just exists. Also added additional lines to whereis to ensure we only find the binary: -b (only binary files), -B (only those paths).