Checks :algorithm argument for valid values