Handle Java string comaparison properly