Fixed wrong comparison between number and object.

Fixed comparison between number and object.
Value (number) should have been passed, but object was passed instead.