moved if null before if string