package cpup.lib

object Util {
	def checkNull[T, R](obj: T, fn: (T) => R, default: R): R = {
		if(obj == null) {
			default
		} else {
			fn(obj)
		}
	}
}
package cpup.lib

object Util {
	def checkNull[R](obj: R, default: R): R = {
		if(obj == null) {
			default
		} else {
			obj
		}
	}
}
Make checkNull just check for null and return a default
Make checkNull just check for null and return a default
