check if props is non-nil before attempting to access