Java tutorial
//package com.java2s; public class Main { /** * Tries to parse specified object to boolean. If object is null, returns null. * * @param o Object to be parsed * @return Parsed object or null */ public static Boolean parseBoolean(Object o) { if (o == null) { return null; } return Boolean.parseBoolean((String) o); } }