it is the "normal" behavior if one of both isnt a valid string. check the code path of creating st in a more detailed fashion.
SBJSON *parsedata=[[SBJSON alloc] init];
dic=[parsedata objectWithString:jsondata error:nil];
if([dic count]>0)
{
NSMutableString *st=[[NSMutableString alloc]initWithString:[dic objectForKey:@"loginResult"]];
if ([st isEqualToString:@"YES"])