use proper check for defined prop