check for nil before parsing integers