parameter coming with null value does not change when I change it in stored procedure
===

I have the stored prodecure below, when I pass null value for Gkol I want it to be changed to the minimum possible amount ( that exists in the table ) but it does not happen, why is that?  


----------


    Alter PROCEDURE sp_vUnitsUnitTejariGetFilteredUnitDetail(
		@UnitFB bit,
		@UnitWithCooking bit,
		@MMofidFrom float = null,
		@MMofidTo float = null,
		@GKolFrom float = null,
		@GKolTo float = null
		)
    AS
    BEGIN
	declare @MMofidCalculative bit
	declare @GKolCalculative bit
	
	if(@MMofidFrom is null)
		select @MMofidFrom = MIN(MMofid) from vw_PSA_UnitsUnitTejari
	if(@MMofidTo is null)
		select @MMofidTo = MAX(MMofid) from vw_PSA_UnitsUnitTejari
	
	if(@GKolFrom is null)
		select @GKolFrom = MIN(GKol) from vw_PSA_UnitsUnitTejari
	if(@GKolTo is not null)
		select @GKolTo = MAX(GKol) from vw_PSA_UnitsUnitTejari
	
	Select * from vw_PSA_UnitsUnitTejari 
	where UnitTypeID = 1
	And UnitStateID = 1
	And UnitFB = ISNULL(@UnitFB,UnitFB)
	And UnitWithCooking = ISNULL(@UnitWithCooking,UnitWithCooking)
	And MMofid between @MMofidFrom and @MMofidTo
	And GKol between @GKolFrom and @GKolTo
    END