Empty Check for javascript