Use strlen instead of empty cause PHP doesn't like string zero.