I think get(k).isDefined is clearer.