Many ls() queries are intended to find a single object, but ls always returns a list (or, in older Mayas, a single None). This creates complicated error checking for a simple question.
The easiest way to get a single value from an ls under any circumstances is
result = (cmds.ls('your query here'...