Here you can find the source of isValid(Object[] args)
public static boolean isValid(Object[] args)
//package com.java2s; //License from project: Open Source License import org.mozilla.javascript.Context; public class Main { public static boolean isValid(Object o) { return o != null && o != Context.getUndefinedValue(); }// www .j a va2s . c o m public static boolean isValid(Object[] args) { return args.length > 0 && args[0] != Context.getUndefinedValue(); } }