unable to test 'data' for specific value

unable to test 'data' for specific value

I'm unable to test 'data' for specific results, even when I see that 'data' is the value I'm testing for: 

$.post( "phpScript.php", $("#form").serialize() ,function(data)
{


alert(data); //even if I see that the data is "hello" here, 
if ( data == "hello")
{
alert("yup, the data is hello"); //this doesn't occur.
};

});

Does anyone know what I'm doing wrong here?