javascript return true if not null