Is this line really necessary? Couldn't you just check for the inversion (!manageMediaValue) ?