check for null in onLoad