Addeds checks for void and null values