Check the type of the object "Roles" returned in wp.getProfile is an Array of objects.