Changed check for scalar