fix js empty check