Higher spin fields and duality